const mongoose = require('mongoose')

const trendSchema = mongoose.Schema({
  'price': Number,
  'volume': Number,
  'amount': Number,
  'datetime': Date,
})

exports.trendSchema = trendSchema

const transactionSchema = mongoose.Schema({
  'seller': String,
  'buyer': String,
  'price': Number,
  'volume': Number,
  'amount': Number,
  'datetime': Date
})

exports.transactionSchema = transactionSchema

const orderSchema = mongoose.Schema({
  'price': Number,
  'volume': Number,
  'amount': Number,
  'user': String,
  'bid': Boolean,
  'timestamp': Number,
  'datetime': Date
})

exports.orderSchema = orderSchema

const orderSumSchema = mongoose.Schema({
  'price': Number,
  'volume': Number,
  'amount': Number,
  'bid': Boolean,
})

exports.orderSumSchema = orderSumSchema

const eventSchema = mongoose.Schema({
  'name': String,
  'description': String,
  'address': String
})
exports.Event = mongoose.model('event', models.eventSchema, 'event')
exports.eventSchema = eventSchema
